package xyz.sicau.controller;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.sicau.feign.clients.UserClient;
import xyz.sicau.feign.pojo.User;
import xyz.sicau.popj.Order;

@Slf4j
@RestController
public class OrderController {

    @Resource
    UserClient userClient;

    @RequestMapping("/order")
    public Order hello() {
        log.info("order/hello 发送请求");
        User user = userClient.getUserById(98);
        return new Order(114514, user);
    }
}
